  <tr valign="top">
    <td height="40" align="left" class="dato" background="/images/topHeader.gif" colspan="4">Eventos</td>
  </tr>
    <tr>
     <td colspan="4" align="center" background="/images/vg.jpg"><span class="subdatos">Nuevos eventos</td>
  </tr>
    <tr><td>&nbsp;</td></tr>

<% form_for(@event) do |f| %>
<%= error_messages_for :event, :header_message => "Por favor intente de nuevo.", :message => "Encontramos un error en los siguientes campos:" %>
 <tr>
 	<td>Nombre : <%= f.text_field :name, :size => 30 %></td>
 </tr>
      <tr><td>&nbsp;</td></tr>
  <tr>
 	<td>Descripcion : <%= f.text_field :description, :size =>30 %></td>
 </tr>
     <tr><td>&nbsp;</td></tr>
  <tr>
  	 <td>Categoria: <%= f.collection_select( :category_idf, Category.find(:all), :id, :name,
                     {:prompt   => "<------Seleccione------>"} )%></td>
  </tr>
  	 
  	 
      <tr><td>&nbsp;</td></tr>
  <tr>
 	<td>Fecha Evento: <% CalendarDateSelect.format=(:iso_date)%>
		<%= calendar_date_select_includes %> 
		<%= f.calendar_date_select :eventstart, :year_range => 0.years.from_now.year..1.years.from_now.year %></td>
 </tr>
     <tr><td>&nbsp;</td></tr>
  <tr>
 	<td>Final  Evento: <% CalendarDateSelect.format=(:iso_date)%>
		<%= calendar_date_select_includes %> 
		<%= f.calendar_date_select :eventfinish, :year_range => 0.years.from_now.year..1.years.from_now.year %></td>
 </tr>
     <tr><td>&nbsp;</td></tr>
  <tr>   
     <td colspan="4" align="center" background="/images/vg.jpg"><span class="subdatos">Fecha de Apuestas</td>
  </tr> 
       <tr><td>&nbsp;</td></tr>
    <tr>
 	<td>Inicio Apuestas: <% CalendarDateSelect.format=(:iso_date)%>
		<%= calendar_date_select_includes %> 
		<%= f.calendar_date_select :betstart, :year_range => 0.years.from_now.year..1.years.from_now.year %></td>
 </tr>
      <tr><td>&nbsp;</td></tr>
   <tr>
 	<td>Final Apuestas : <% CalendarDateSelect.format=(:iso_date)%>
		<%= calendar_date_select_includes %> 
		<%= f.calendar_date_select :betfinish, :year_range => 0.years.from_now.year..1.years.from_now.year %></td>
 </tr>
       <tr><td>&nbsp;</td></tr>
 <tr>
 	<td>Codigo(E1E2YYYY-MM-DD) : <%= f.text_field :cod, :size => 30 %></td>
 </tr>
	 <tr><td>&nbsp;</td></tr>
  <tr>
 	<td><%= f.submit 'Crear' %></td>
  </tr>
<% end %>

  <tr>
 	<td><%= link_to 'Mostrar', @event %> |
<%= link_to 'Regresar', events_path %></td>
  </tr>
